package common;

public class UserTweetFrequency implements Comparable<UserTweetFrequency> {
    private String user;

    private int tweetCount;

    public UserTweetFrequency(String user, int tweetCount) {
        super();
        this.user = user;
        this.tweetCount = tweetCount;
    }

    public UserTweetFrequency(String user) {
        this(user, 1);
    }

    public String getUser() {
        return user;
    }

    public int getTweetCount() {
        return tweetCount;
    }

    public void incrementTweetCount() {
        tweetCount++;
    }

    @Override
    public int compareTo(UserTweetFrequency other) {
        return this.tweetCount - other.tweetCount;
    }

}
